﻿using System;
using System.Collections.Generic;
using System.Text;

namespace aDream.Domain
{
    public class Property 
    {
        private String type;
        private String description;
        private String details;
        private Address address;
        private List<Asset> assets = new List<Asset>();
        private int agentId;
        private int id;

        public Property(int id, String type, String description, String details, Address address)
        {
            this.id = id;
            this.type = type;
            this.description = description;
            this.details = details;
            this.address = address;
        }

        public void addAddress(Address address)
        {
            this.address = address;
        }


        public void addAgent(int agentId)
        {
            this.agentId = agentId;
        }

        public void addAsset(int id, String name, int quantity)
        {
            assets.Add(new Asset(id, name, quantity));
        }

        public String Type
        {
            get {return type;}
            set {type = value;}
        }

        public String Description
        {
            get {return description;}
            set { description = value; }
        }

        public int Id
        {
            get { return id; }
        }

        public Address Address
        {
            get {return address;}
            set {address = value;}
        }

        public bool matches(int id)
        {
            return this.id == id;
        }

        public override string ToString()
        {
            return type + ": " + address.ToString();
        }


    }
}
